README for SpaceLocalizer

@author Chien-Liang Fok (liangfok@wustl.edu)

The SpaceLocalizer parses data generated by a cricket mote and delivered
through the serial port and determines which space is the closest.  When
the closest space changes, it signals an event as defined by interface
SpaceLocalizerI.

---- Making the UART baud rate match ---
The Cricket motes set their UART baud rate to be 115.2 kbps.  Mica2 motes
by default use 57.6 kbps.  In order for the two motes to communicate, both
must have the same baud ratings.

How to change Mica2 to 115.2kbps:
  1) Open <tos>/tos/platform/mica2/HPLUART0M.nc
  2) Comment out the two lines following the comment "// Set 57.k KBps".
     They should be:
       //outp(0,UBRR0H); 
       //outp(15, UBRR0L);
  3) Add the following in its place:
       outp(0,UBRR0H); 
       outp(7, UBRR0L);

How to change Cricket motes to run at 57.6kbps:
  1) Open <tos>/tos/platform/cricket/HPLUART0M.nc
  2) Comment out the two lines following the comment "// 115kbps, N-8-1".
     They should be:
       //outp(0,UBRR0H); 
       //outp(7, UBRR0L);
  3) Uncomment the two lines following the comment "// Set 57.6 KBps".
     They should be:
       outp(0,UBRR0H); 
       outp(15, UBRR0L);

-- Testing --
To test the SpaceLocalizer, wire up FakeSerialC to interface Serial of
SpaceLocalizerM within SpaceLocalizerC.nc.  This will generate a bunch of
fake serial events for the SpaceLocalizer to parse.  For tests using real
serial events, wire up SerialM instead of FakeSerialC within 
SpaceLocalizerC.nc.

-- Installation --
The main configuration file is SpaceLocalizerTester.nc.  You can compile 
and install the application using the standard TinyOS make system.  

-- Running --
When running the tester on a real mote, you can setup a second mote with TOS_Base 
installed.  Each time the mote with SpaceLocalizer changes spaces, it will
broadcast a message with the name of the new space.

-- Integrating --
To integrate the SpaceLocalizer within your application, you want to wire-up
SpaceLocalizerC within your application.  This component provides the interface
SpaceLocalizerI, which generates an event whenever the mote moves.  The event
contains the name of the space the mote now resides in.
